package pers.amos.edu.common;

import java.util.List;

/**
 * @author amos wong
 * @create 2019-12-08 12:05
 */

/**
 * 分页查询的返回结果
 */
public class PageResult<T> {
    /**
     * 查询到信息的总条数
     */
    private Long total;// 总条数
    /**
     * 总页数
     */
    private Integer totalPage;// 总页数
    /**
     * 当前页的数据
     */
    private List<T> items;// 当前页数据

    public PageResult(Long total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }
}
